home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / pas / swag / oop.swg / 0049_Elimating Menu Bar in TV.pas < prev    next >
Pascal/Delphi Source File  |  1994-11-30  |  2KB  |  51 lines

  1. {
  2. > Does anybody know how to get rid of the menu bar?  I'm using Pascal.
  3.  
  4. You can make Turbo Vision look however you wish for a text mode interface.  I
  5. posted this code here earlier which is Turbo Vision without a visible menu
  6. bar or status line:
  7. }
  8. program TVDesk;
  9. { File: TVDESK.PAS
  10.   Author: John Howard  jh
  11.   Origin: (1:280/66)
  12.   Date: August 16, 1994
  13.   Note: Allows a full Turbo Vision desktop with a specific character pattern.
  14.   Version: 1.0
  15. }
  16. uses App, Objects, Menus;
  17. type
  18.    TTutorApp = object(TApplication)
  19.                procedure InitStatusLine; virtual;
  20.                procedure InitMenuBar; virtual;
  21.                procedure InitDesktop; virtual;
  22.    end;
  23.  
  24. procedure TTutorApp.InitStatusLine;         { draw nothing, allow ALT-X quit }
  25. var R: TRect;
  26. begin
  27.   GetExtent(R);
  28.   R.A.Y := R.B.Y + 1;                       { below screen bottom }
  29.   New(StatusLine, Init(R, NewStatusDef(0, $EFFF, StdStatusKeys(nil), nil)));
  30. end;
  31.  
  32. procedure TTutorApp.InitMenuBar;            { do nothing }
  33. begin end;
  34.  
  35. procedure TTutorApp.InitDesktop;
  36. var R: TRect;
  37. begin
  38.   GetExtent(R);                             { get application rectangle }
  39.                                             { Adjust R.A.Y and R.B.Y here! }
  40.   New(Desktop, Init(R));                    { construct custom desktop }
  41.   Desktop^.Background^.Pattern := ' ';      { change pattern character }
  42. end;
  43.  
  44. var TutorApp : TTutorApp;                   { declare an instance of yours }
  45. begin
  46.   TutorApp.Init;
  47.   TutorApp.Run;
  48.   TutorApp.Done;
  49. end.
  50.  
  51.